<template>
    <van-grid :border="false" :column-num="1">
        <van-grid-item v-for="(item, i) in videoList" :key="i" @click="toVideo(item.src)">
            <van-card :desc="item.uname" :title="item.title" :thumb=" item.img" :thumb-link="item.src" />
        </van-grid-item>
    </van-grid>

</template>

<script>
  import request, {
    getUrl
  } from "../../utils/request2";
export default {
    data() {
        return {
            videoList: []
        };
    },
    created() {
        // this.getvideo();
        request({ //发起request请求（获取轮播图）
          url: getUrl("Video/getVideoList"), //URL
          method: "get", //请求方法
          params: { //Post传data，get请求传params
          }
        }).then(res => { //成功回调
          this.videoList = res.data.data
        }).catch(error => { //失败回调
          showDlg('错误提醒', '网络错误！')
        })
    },
    methods: {
      toVideo(src){
        console.log(src);
         window.location.href=src
      }
    }

}
</script>

<style>
.van-card {
    width: 100%;
    font-size: 16px;

}

.van-card__content {
    width: auto;
}



.van-card__thumb {
    width: auto;
}
</style>
